# 1.导入 selenium
from selenium import webdriver

# 2.创建浏览器操作对象
path = 'chromedriver.exe'

browser = webdriver.Chrome(path)

url = 'https://www.baidu.com'
browser.get(url)

by_id = browser.find_element_by_id('su')
print(by_id.get_attribute('class'))

browser.quit()







